-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[ORC] Update ELF debugger support plugin to use AllocActions #167866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ORC] Update ELF debugger support plugin to use AllocActions #167866
Conversation
|
FYI: the Windows build failed with an unrelated error |
|
If we switch to a dealloc action for deallocation I think that would simplify this a lot further: At that point |
|
Thanks for the feedback. Yes, exactly! I have a patch for it already: weliveindetail@2cf880f, but there are 2 open issues. I will sort it out into PRs next week. I think it's good to review in isolation. |
lhames
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback. Yes, exactly! I have a patch for it already: weliveindetail@2cf880f, but there are 2 open issues. I will sort it out into PRs next week. I think it's good to review in isolation.
LGTM. Thanks @weliveindetail -- I look forward to checking out the upcoming PRs too. :)
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/27575 Here is the relevant piece of the build log for the reference |
The
DebugObjectManagerPluginimplements debugger support for ELF platforms with the GDB JIT Interface. It emits a separate debug object allocation in addition to the LinkGraph's own allocation. This used to happen in the plugin'snotifyEmitted()callback, i.e. after the LinkGraph's allocation was finalized. In the meantime, it had to block finalization of the corresponding materialization unit to make sure that the debugger can register the object before the code runs.This patch switches the plugin to use an allocation action instead. We can remove the
notifyEmitted()hook and implement all steps as JITLink passes:PostAllocationPassesPreFixupPasses, i.e. before the LinkGraph's allocation is finalized. This is great, because it can run in parallel to the LinkGraph's link phase 3.PostFixupPassesand run the GDB JIT Interface registration in anAllocActionwhen finalizing the LinkGraph's allocation.Main benefits are:
This PR implements the basic switch. I want to add some more improvements to the plugin in a follow-up (mostly NFC then).